<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8" />
    <title>商服充值重发</title>
    <script th:src="@{/js/jquery.js}"></script>

</head>
<body>

<form name="billInfo">
    <table>
        <tr>
            <td>充值编号:</td>
            <td><input type="text"  name="detailsId" style="width: 320px" /></td>
        </tr>
        <tr>
            <td>电表号:</td>
            <td><input type="text"  name="deviceId" style="width: 320px" /></td>
        </tr>
        <tr>
            <td>金额:</td>
            <td><input type="text"  name="money" style="width: 320px" /></td>
        </tr>

        <tr>
            <td colspan="2">
                <input type="button" value="提交" onclick="return add()" />
            </td>
        </tr>
    </table>


</form>
</body>


<script type="text/javascript">
    function add(){
        var detailsId = billInfo.detailsId.value;
        var deviceId = billInfo.deviceId.value;
        var money = billInfo.money.value;

        $(document).ready(function(){
            $.post("/recharge_retry_submit",
                {"detailsId":detailsId,"deviceId":deviceId,"money":money},
                function(data){
                    if(data == true){
                        alert("成功");
                    }
                    if(data == false){
                        alert("失败");
                    }
                });
        });
    }
</script>
</html>